def run(params:list[str]):
    import instructor
    import json
    from openai import OpenAI
    from ApiTools import apiBase

    txt = apiBase.argv_cls(1,"John Doe is 30 years old")
    cls = apiBase.argv_cls(2,"""class UserInfo(BaseModel):\nname: str\nage: int""")
    client = instructor.from_openai(OpenAI(base_url=apiBase.prop_read("OPENAI_API_BASE")))
    # Extract structured data from natural language
    obj = client.chat.completions.create(
        model=apiBase.prop_read("OPENAI_MODEL"),
        response_model=cls,
        messages=[{"role": "user", "content": txt}],
    )
    # 转换为JSON
    item_json = obj.json()
    ret=json.dumps(item_json,ensure_ascii=False)
    print(ret)